/*
  * @file geometry.cpp
  * @author Thibault Merle et Guillaume Poussel
  */
#include "base/Vector.h"
#include "base/Point.h"
#include "base/geometry.h"

bool are_on_row(const Point* p1, const Point* p2, const Point* p3) {
    Vector v1(p1, p2);
    Vector v2(p2, p3);
    return cross_product(&v1, &v2) == 0;
}

c_prod_type cross_product(const Vector* v1, const Vector* v2) {
    return v1->x()*v2->y() - v1->y()*v2->x();
}

